package com.bfly.mall.user.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bfly.core.base.entity.BaseEntity;

import java.io.Serializable;

/**
 * 收货地址
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/9/15 20:33
 */
@TableName(value = "user_address", resultMap = "AddressResultMap")
public class Address extends BaseEntity implements Serializable {

    private static final long serialVersionUID = -8913976155025407594L;

    /**
     * 省份
     */
    private String province;

    @TableField("province_id")
    private int provinceId;

    /**
     * 市
     */
    private String city;

    @TableField("city_id")
    private int cityId;

    /**
     * 行政区/镇
     */
    private String district;

    @TableField("district_id")
    private int districtId;

    /**
     * 详细地址
     */
    private String address;

    /**
     * 是否是默认地址
     */
    @TableField("is_default")
    private boolean defaultAddress;

    /**
     * 所属用户
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/9/18 20:59
     */
    @TableField("user_id")
    private int userId;

    @TableField(exist = false)
    private User user;

    /**
     * 手机号码
     *
     * @author 长沙商脉科技有限公司
     */
    private String phone;

    /**
     * 收件人
     */
    private String consignee;

    /**
     * 邮编
     *
     * @author 长沙商脉科技有限公司
     * @date 2020/10/4 19:32
     */
    @TableField("post_code")
    private String postCode;

    public int getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(int provinceId) {
        this.provinceId = provinceId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public int getDistrictId() {
        return districtId;
    }

    public void setDistrictId(int districtId) {
        this.districtId = districtId;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public boolean isDefaultAddress() {
        return defaultAddress;
    }

    public void setDefaultAddress(boolean defaultAddress) {
        this.defaultAddress = defaultAddress;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }
}
